Night Shift is a built in software feature of iOS and macOS. It was introduced in 2016-2017 into iOS in iOS 9.3 and into macOS in macOS Sierra 10.12.4.
There are two modes you can choose between: an automatic Sunset to Sunrise switching or manually defined On and Off hours that you can set such as 22:00 to 7:00 ...